var UIUtils = function() {};

//成功提示
UIUtils.alertSuccess = function(msg){
	 $.ligerDialog.SQalert({content:msg, SQ_type: "success"});
}
//错误提示
UIUtils.alertError = function(msg){
	//$.ligerDialog.SQalert({content:msg, SQ_type: "error"});
	 $.ligerDialog.SQalert({
         content: msg,
         SQ_type: "error",
         SQ_showButtons: true,
         SQ_onBtnclick: function (item, Dialog) {
             //console.log(item, Dialog);
         },
     });
}
//警告提示
UIUtils.alertWarning = function(msg){
	$.ligerDialog.SQalert({content: msg, SQ_type: "warning" });
}


//成功提示-有一个确定按钮 单击后关闭
UIUtils.alertSuccessHold1 = function(msg){
	 $.ligerDialog.SQalert({content:msg, SQ_showButtons: true,SQ_type: "success"});
}
//错误提示-有一个确定按钮 单击后关闭
UIUtils.alertErrorHold1 = function(msg){
	$.ligerDialog.SQalert({content:msg, SQ_showButtons: true,SQ_type: "error"});
}
//警告提示-有一个确定按钮 单击后关闭
UIUtils.alertWarningHold1 = function(msg){
	$.ligerDialog.SQalert({content: msg, SQ_showButtons: true,SQ_type: "warning" });
}

//等待提示
UIUtils.alertWaiting = function(info, callback){
	var wait_dialog = $.ligerDialog.SQalert({content: info, SQ_type: "waitting",onClose: function () {
		if (typeof(callback) == 'function') {
			callback();
		};
	}});
	return wait_dialog;
}

//GRID列提示
UIUtils.showColumnTip = function(value){
	if(StringUtils.isEmpty(value)){
	     value = ""; 
	}
	var h='<span class="gridTip" title="'+ value +'">'+ value +'</span>';
   return h;
}

//GRID列提示
UIUtils.showColumnTip = function(showValue, tipValue){
	if(StringUtils.isEmpty(showValue)){
		showValue = ""; 
	}
	if(StringUtils.isEmpty(tipValue)){
		tipValue = ""; 
	}
	var h='<span class="gridTip" title="'+ tipValue +'">'+ showValue +'</span>';
   return h;
}
